package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.cloudkinto.enumType.order.allocate.AllocatePackageType;
import com.cloudkinto.enumType.order.allocate.AllocatePlanStockLockStatus;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 调拨子表
 * </p>
 *
 * @author long
 * @since 2025-03-11
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_allocate_plan_item")
public class AllocatePlanItemDo extends Model<AllocatePlanItemDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 调拨计划id
     */
    @TableField("order_id")
    private Long orderId;

    /**
     * 平台产品id
     */
    @TableField("platform_product_id")
    private Long platformProductId;

    /**
     * msku
     */
    @TableField("msku")
    private String msku;

    /**
     * fnsku
     */
    @TableField("fnsku")
    private String fnsku;

    /**
     * asin
     */
    @TableField("asin")
    private String asin;

    /**
     * 父asin
     */
    @TableField("parent_asin")
    private String parentAsin;

    /**
     * janCode
     */
    @TableField("jan_code")
    private String janCode;

    @TableField("image_url")
    private String imageUrl;

    /**
     * 产品id
     */
    @TableField("product_id")
    private Long productId;

    /**
     * sku
     */
    @TableField("sku")
    private String sku;

    /**
     * 品名
     */
    @TableField("product_name")
    private String productName;

    /**
     * 国家
     */
    @TableField("country")
    private String country;

    /**
     * 包装类型 {@link AllocatePackageType}
     */
    @TableField("package_type")
    private Integer packageType;

    /**
     * 箱规名称
     */
    @TableField("box_gauge_name")
    private String boxGaugeName;

    /**
     * 单箱数量
     */
    @TableField("per_box_qty")
    private Integer perBoxQty;

    /**
     * 箱数
     */
    @TableField("box_qty")
    private Integer boxQty;

    /**
     * 锁定库存数
     */
    @TableField("lock_qty")
    private Integer lockQty;

    /**
     * 计划发货量
     */
    @TableField("plan_shipments")
    private Integer planShipments;

    /**
     * 实际发货量
     */
    @TableField("actual_shipments")
    private Integer actualShipments;

    /**
     * 是否换标 0否 1是
     */
    @TableField("change_label")
    private Boolean changeLabel;

    /**
     * 备注
     */
    @TableField("remark")
    private String remark;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(value = "delete_flag", fill = FieldFill.INSERT)
    @TableLogic
    private Integer deleteFlag;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}